package kgame5.kgui {
import flash.display.DisplayObject;
import flash.geom.ColorTransform;

/**
 * @author kk
 * 设置一些mc的简单颜色,注意每次都生成新的对象了
 */
public class ColorManager {
	public static var WHITE:ColorTransform=new ColorTransform(1,1,1,1,255,255,255);
	public static var RED:ColorTransform=new ColorTransform(2,0.5,0.5);
	public static var NONE:ColorTransform=new ColorTransform();
	public static var BLACK:ColorTransform=new ColorTransform(0,0,0);
	
	public static var PURPLE:ColorTransform=new ColorTransform(2,1,2);
	
	//坦克受伤的颜色，黑
	public static var HURT:ColorTransform=new ColorTransform(0.7,0.7,0.7);
	
	//死亡坦克碎片的颜色
	public static var DIE:ColorTransform=new ColorTransform(0.7,0.7,0.7);
	
	public static function whiteColor(mc:DisplayObject){
		mc.transform.colorTransform=WHITE;
	}
	public static function redColor(mc:DisplayObject){
		mc.transform.colorTransform=RED;
	}
	public static function noneColor(mc:DisplayObject){
		mc.transform.colorTransform=NONE;
	}
	public static function blackColor(mc:DisplayObject){
		mc.transform.colorTransform=BLACK;
	}
	
	public static function hurtColor(mc:DisplayObject){
		mc.transform.colorTransform=HURT;
	}
	public static function dieColor(mc:DisplayObject){
		mc.transform.colorTransform=DIE;
	}
	
	public static function purpleColor(mc:DisplayObject){
		mc.transform.colorTransform=PURPLE;
	}
}
}
